/**
 * @author Jialun Bian
 * @version 1.0
 */
package userInterface;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class MainMenuBar extends JMenuBar {
    public MainMenuBar() {
        JMenuItem menuItem;

        //File Menu
        JMenu fileMenu = new JMenu("File");
        add(fileMenu);
        menuItem = new JMenuItem("New",KeyEvent.VK_N);
        menuItem.setToolTipText("Create a New Panel");
        fileMenu.add(menuItem);
        menuItem = new JMenuItem("Open",KeyEvent.VK_O);
        menuItem.setToolTipText("Open a exist File");
        fileMenu.add(menuItem);
        menuItem = new JMenuItem("Save",KeyEvent.VK_S);
        menuItem.setToolTipText("Save current panel to a file");
        fileMenu.add(menuItem);
        menuItem = new JMenuItem("Export",KeyEvent.VK_E);
        menuItem.setToolTipText("Export the panel to img filetype");
        fileMenu.add(menuItem);
        fileMenu.addSeparator();
        menuItem = new JMenuItem("Quit",KeyEvent.VK_Q);
        menuItem.setToolTipText("Exit the program");
        fileMenu.add(menuItem);


        //EditMenu
        JMenu editMenu = new JMenu("Edit");
        add(editMenu);
        menuItem = new JMenuItem("Undo",KeyEvent.VK_U);
        menuItem.setToolTipText("Undo what you did");
        editMenu.add(menuItem);
        menuItem = new JMenuItem("Redo",KeyEvent.VK_R);
        menuItem.setToolTipText("Redo what you Redo");
        editMenu.add(menuItem);

        //OptionMenu
        JMenu optionMenu = new JMenu("Option");
        add(optionMenu);
        menuItem = new JMenuItem("Settings",KeyEvent.VK_S);
        optionMenu.add(menuItem);

        //HelpMenu
        JMenu helpMenu = new JMenu("Help");
        add(helpMenu);
        menuItem = new JMenuItem("Online Help",KeyEvent.VK_H);
        menuItem.setToolTipText("Find help via Internet");
        helpMenu.add(menuItem);
        menuItem = new JMenuItem("About SimplePCLOGO",KeyEvent.VK_A);
        helpMenu.add(menuItem);
    }

}
